package cmsi.utils;

import java.util.List;
import java.util.Random;

/**
 * Created by zzy on 2016/4/26 0026.
 */
public class CouponHelper {

    public static String  getUniqueCode(List<String> list, String code){
        if(list.contains(code)){
            Random rnd = new Random();
            int num = rnd.nextInt(89999) + 10000;
            code="ZRX"+num;
            getUniqueCode(list,code);
        }
        return code;
    }



}
